<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<style type="text/css">
			#cotainer{
				width: 100%;
				height: 800px;
				display: flex;
				justify-content: center;
			}
			#outDiv{
				width: 600px;
				height: 500px;
				
				overflow: hidden;
			}
			#neidiv{
				width: 1600px;
				height: 100px;
				display: flex;
				align-items: center;
				
				justify-content: center;
				margin-top: 200px;
			}
			#neidiv img{
				width: 100px;
				height: 100px;
			}
		</style>
	</head>
	<body>
		<div id="cotainer">
			<div id="outDiv">
					<div id="neidiv" onmouseenter="onshubiao();" onmouseleave="leshubiao()">
						<img src="img/1.jpeg" >
						<img src="img/2.jpeg" >
						<img src="img/3.jpeg" >
						<img src="img/4.jpeg" >
						<img src="img/5.jpeg" >
						<img src="img/6.jpeg" >
						<img src="img/7.jpeg" >
						<img src="img/8.jpeg" >
						<img src="img/9.jpeg" >
						<img src="img/10.jpeg" >
						<img src="img/1.jpeg" >
						<img src="img/2.jpeg" >
						<img src="img/3.jpeg" >
						<img src="img/4.jpeg" >
						<img src="img/5.jpeg" >
						<img src="img/6.jpeg" >
					</div>
			</div>
		</div>
	</body>
	<script type="text/javascript">
	
			var onmarObj = document.getElementById('neidiv');
			var margin = 0;
			var myinter=null;
			function taohanshu(){
				if(margin == -1000){
					margin =0;
				}
				margin--;
				onmarObj.style.marginLeft = margin+'px';
				if(margin % 100 == 0){
					clearInterval(myinter);
					setTimeout(function(){
						if(flag){
							myinter = setInterval(taohanshu,10);
							flag = false;
						}else{
							clearInterval(myinter);
							myinter = setInterval(taohanshu,10);
							flag = false;
						}
					},1000)
				}
				
			}
		onload = function(){
			if(flag){
				myinter = setInterval(taohanshu,10);
				flag = false;
			}
		}
		flag = true;
		function onshubiao(){
			
			if(myinter){
				clearInterval(myinter);
				flag = true;
			}
		}
		function leshubiao(){
			if(flag){
				flag = false;
				myinter = setInterval(taohanshu,10);
			}
		}
	</script>
</html>
